import { COMPONENT_TYPE } from '../../constants'

/**
 * @author xuyh0817
 * @email xuyh0817@foxmail.com
 * @date 2022-02-19 00:35
 * @version 2.0.0
 * @doc todo
 * @website todo
 * @remark  如果要分发源码，需在本文件顶部保留此文件头信息！！
 */
export default [
  {
    id: '1',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'activeKey',
      rules: [],
      label: '激活面板',
      extra: '当前激活 tab 面板的 key',
    },
    attrs: {
      value: '',
      maxLength: 100,
      type: 'text',
      allowClear: true,
      placeholder: '请输入key'
    }
  },
  {
    id: '2',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'animated',
      rules: [],
      label: '是否动画',
      extra: '是否使用动画切换 Tabs，在 tabPosition=top|bottom 时有效',
    },
    attrs: {
      checked: true
    }
  },
  {
    id: '3',
    type: COMPONENT_TYPE.RADIO_BUTTON,
    formItem: {
      prop: 'size',
      rules: [],
      label: '大小',
      extra: '提供 large default 和 small 三种大小',
    },
    attrs: {
      value: 'default',
      buttonStyle: 'solid',
      children: [
        {
          value: 'large',
          label: 'large'
        },
        {
          value: 'default',
          label: 'default'
        },
        {
          value: 'small',
          label: 'small'
        }
      ]
    }
  },
  {
    id: '4',
    type: COMPONENT_TYPE.RADIO_BUTTON,
    formItem: {
      prop: 'tabPosition',
      rules: [],
      label: '页签位置',
      extra: '可选值有 top right bottom left',
    },
    attrs: {
      value: 'top',
      buttonStyle: 'solid',
      children: [
        {
          value: 'top',
          label: 'top'
        },
        {
          value: 'right',
          label: 'right'
        },
        {
          value: 'bottom',
          label: 'bottom'
        },
        {
          value: 'left',
          label: 'left'
        }
      ]
    }
  },
  {
    id: '5',
    type: COMPONENT_TYPE.RADIO_BUTTON,
    formItem: {
      prop: 'type',
      rules: [],
      label: '基本样式',
      extra: '可选 line、card 类型',
    },
    attrs: {
      value: 'line',
      buttonStyle: 'solid',
      children: [
        {
          value: 'line',
          label: 'line'
        },
        {
          value: 'card',
          label: 'card'
        }
      ]
    }
  },
  {
    id: '6',
    type: COMPONENT_TYPE.INPUT_NUMBER,
    formItem: {
      prop: 'tabBarGutter',
      rules: [],
      label: '间隙',
      extra: 'tabs 之间的间隙',
    },
    attrs: {
      value: 8,
      placeholder: '请输入间隙值'
    }
  },
  {
    id: '7',
    type: COMPONENT_TYPE.INPUT_BUTTON,
    formItem: {
      prop: 'children',
      rules: [],
      label: '面板名称',
      extra: '',
    },
    attrs: {
      grid: 'row',
      value: [{ code: 'test', name: '测试' }],
      count: 2,
      keys: 'code,name',
      placeholders: '请输入编码,请输入名称',
      type: 'text',
      allowClear: true
    }
  },
  {
    id: '8',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'layoutName',
      rules: [],
      label: '组件名称',
      extra: '在使用插槽时方，用于标识当前组件',
    },
    attrs: {
      value: Date.now() + '',
      maxLength: 100,
      type: 'text',
      allowClear: true,
      placeholder: '请输入组件名称'
    }
  }
]
